/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.menosehmais.model;

import br.com.menosehmais.framework.persistence.DomainObject;
import br.com.menosehmais.framework.persistence.IHaveCreationDateTime;
import java.util.LinkedList;
import java.util.List;
import org.hibernate.annotations.Type;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import org.joda.time.LocalDateTime;

/**
 *
 * @author Junior JAFJ
 */
@Entity(name = "contrato")
public class ContratoDO extends DomainObject implements IHaveCreationDateTime {
    @Column(updatable = false)
    @Type(type = "org.joda.time.contrib.hibernate.PersistentLocalDateTime")
    private LocalDateTime creationDateTime;

    @OneToMany
    private List<ServicoDeDesignDO> servicosDesign;

    @OneToMany
    private List<ServicoDeDesignDO> servicosDesignNaoSelecionado;
    
    @OneToMany
    private List<ServicoDeMarketingDO> servicosMarketing;

    @OneToMany
    private List<ServicoDeMarketingDO> servicosMarketingNaoSelecionado;

    @ManyToOne
    private EmpresaDO empresa;

    private String tipoContrato;

    public List<ServicoDeDesignDO> getServicosDesignNaoSelecionado() {
        return servicosDesignNaoSelecionado;
    }

    public void setServicosDesignNaoSelecionado(List<ServicoDeDesignDO> servicosDesignNaoSelecionado) {
        this.servicosDesignNaoSelecionado = servicosDesignNaoSelecionado;
    }

    public List<ServicoDeMarketingDO> getServicosMarketingNaoSelecionado() {
        return servicosMarketingNaoSelecionado;
    }

    public void setServicosMarketingNaoSelecionado(List<ServicoDeMarketingDO> servicosMarketingNaoSelecionado) {
        this.servicosMarketingNaoSelecionado = servicosMarketingNaoSelecionado;
    }
        
    public String getTipoContrato() {
        return tipoContrato;
    }

    public void setTipoContrato(String tipoContrato) {
        this.tipoContrato = tipoContrato;
    }

    public EmpresaDO getEmpresa() {
        return empresa;
    }

    public void setEmpresa(EmpresaDO empresa) {
        this.empresa = empresa;
    }

    public List<ServicoDeDesignDO> getServicosDesign() {
        if (servicosDesign == null) {
            servicosDesign = new LinkedList<ServicoDeDesignDO>();
        }
        return servicosDesign;
    }

    public void setServicosDesign(List<ServicoDeDesignDO> servicosDesign) {
        this.servicosDesign = servicosDesign;
    }

    public List<ServicoDeMarketingDO> getServicosMarketing() {
        return servicosMarketing;
    }

    public void setServicosMarketing(List<ServicoDeMarketingDO> servicosMarketing) {
        this.servicosMarketing = servicosMarketing;
    }
    
    @Override
    public LocalDateTime getCreationDateTime() {
        return creationDateTime;
    }

    @Override
    public void setCreationDateTime(LocalDateTime creationDateTime) {
        this.creationDateTime = creationDateTime;
    }

}
